#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;



//int globalVar = 1;
//static int staticGlobalVar = 1;
//int main()
//{
//	static int staticVar = 1;
//	int localVar = 1;
//	int a1[10] = { 1, 2, 3, 4 };
//
//	char  a2[] = "abcd";
//	const char* ptr = "abcd";
//
//	int* ptr1 = (int*)malloc(sizeof(int) * 4);
//	int* ptr2 = (int*)calloc(4, sizeof(int));
//	int* ptr3 = (int*)realloc(ptr2, sizeof(int) * 4);
//
//	free(ptr1);
//	free(ptr3);
//	return 0;
//}

//int main()
//{
//	int* p1 = (int*)malloc(sizeof(int));
//	free(p1);
//	
//	int* p2 = (int*)calloc(4, sizeof(int));
//	int* p3 = (int*)realloc(p2, sizeof(int) * 10);
//	
//	free(p3);
//	return 0;
//}

int main()
{
	int* p1 = (int*)malloc(4*sizeof(int));
	char* p2 = (char*)malloc(4 * sizeof(char));
	float* p3 = (float*)malloc(4 * sizeof(float));

	int* p4 = (int*)calloc(4,sizeof(int));
	char* p5 = (char*)calloc(4, sizeof(char));
	float* p6 = (float*)calloc(4, sizeof(float));


	int* p7 = (int*)realloc(p4, 2 * sizeof(int));
	char* p8 = (char*)realloc(p5, 5 * sizeof(char));
	float* p9 = (float*)realloc(p6, 100000 * sizeof(float));

	free(p1);
	free(p2);
	free(p3);
	/*free(p4);
	free(p5);
	free(p6);*/
	free(p7);
	free(p8);
	free(p9);

	return 0;
}